﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace _11Net8AspNetCore_WebApis.Filter
{
    public class MyActionFilter : IActionFilter
    {
        public void OnActionExecuted(ActionExecutedContext context)
        {
            Console.WriteLine("执行后");
        }

        /// <summary>
        /// Action 执行之前调佣
        /// </summary>
        /// <param name="context"></param>
        /// <exception cref="NotImplementedException"></exception>
        public void OnActionExecuting(ActionExecutingContext context)
        {
            Console.WriteLine("执行前");
        }
    }
}
